package com.rpc.util.generationid;

import java.util.UUID;

/**
 * @author yanzhuoleo
 * @version V1.0
 * @Description:
 * @date 2018-01-16-下午6:32
 */
public class UUIDIGenerationIDImpl implements IGenerationID {

    @Override
    public String getId() {
        String        s   = UUID.randomUUID().toString();
        StringBuilder str = new StringBuilder("");
        //去掉“-”符号
        return str.append(s.substring(0, 8)).append(s.substring(9, 13)).append(s.substring(14, 18))
                  .append(s.substring(19, 23)).append(s.substring(24)).toString();
    }
}
